package com.shop.admin.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.admin.dao.RiderDao;
import com.shop.admin.entity.Rider;
import com.shop.admin.service.RiderService;
import com.shop.admin.utils.PageUtils;
import com.shop.admin.vo.AdminErrandVo;
import com.shop.admin.vo.RiderVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

@Service
public class RiderServiceImpl extends ServiceImpl<RiderDao, Rider> implements RiderService {

    @Resource
    private RiderDao riderDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<RiderVo> page = new Page<>(Long.parseLong(params.get("page").toString()),Long.valueOf(params.get("limit").toString()) );
        Page<RiderVo> resPage = riderDao.queryPageCondition(page,params);
        PageUtils pageUtils=new PageUtils(resPage);
        return pageUtils;
    }
}
